#ifndef REVOLFEATURE_H
#define REVOLFEATURE_H
/*
旋转运算存储旋转Id、变换类型、目标对象、变换结果Id、变换参数等
*/
#include "BaseFeature.h"
#include <RWTools.h>
class RevolFeature : public BaseFeature {
public:
	RevolFeature();
	~RevolFeature();

public:
	//获取私有变量
	int getRevolId();
	int getRevolType();
	int getResultId() override;
	BaseFeature* getTargetFeature() override;
	int getSubShapeIndex();
	gp_Dir getRevolDir();
	gp_Pnt getRevolLocation();

	//设置私有变量
	void setRevolId(int revolId);
	void setRevolType(int revolType);
	void setResultId(int resultId);
	void setTargetFeature(BaseFeature* targetFeature);
	void setSubShapeIndex(int index);
	void setRevolDir(gp_Dir dir);
	void setRevolLocation(gp_Pnt loc);
	void AddOperation(BaseFeature* feature) override {
		if (this->targetFeature->getFeatureType() <= 5) {
			this->targetFeature->AddOperationToList(feature);
		}
		else {
			this->targetFeature->AddOperation(feature);
		}
	};
private:
	int revolId;
	//0:vertex 1:edge 2:face
	int revolType;
	int resultId;
	//选择拉伸对象
	int subShapeIndex;
	//旋转轴方向
	gp_Dir revolDir;
	//旋转轴位置点
	gp_Pnt revolLocation;
	//保存旋转运算前父对象的拓扑数据
	//判断对象是否是不规则对象（即是操作子类），若是则先重做操作获取不规则对象
	BaseFeature* targetFeature;
};
#endif

